#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <iostream>

using namespace std;


int main() {
  int i,j ,k;
  string s;
  string res;
  while ( cin >> s ) {
    string aux;
    string corr;
    for (i = 0; i < s.size(); ++i) {
      corr += s[i];
      if (s[i] >= 'A' && s[i] <= 'Z') s[i] = (s[i]-'A')+'a';
      if ((s[i] < 'a' or s[i] > 'z') && s[i] != '-') {
        if (aux.size() > res.size()) res = aux;
        
        if (corr == "E-N-D") break;
        aux = corr = "";
      } else aux += s[i];
    }
    if (aux.size() > res.size()) res = aux; 
    if (corr == "E-N-D"){  break;}
  }
  cout << res << endl;
  return 0;
}
